# -*- coding: utf-8 -*-
import scrapy
from ScrapyDev.items import ScrapydevItem
from scrapy.http import Request

class QsbkSpider(scrapy.Spider):
    name = 'qsbk'
    allowed_domains = ['7cl.in']
    # start_urls = ['http://2017la.com/']
    # 首次爬取
    def start_requests(self):
        ua = {"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.1 Safari/605.1.15"}
        yield Request("http://www.7cl.in/videos/35/index.html",headers=ua)
    def parse(self, response):
        item = ScrapydevItem()
        item["content"] = response.xpath("//p[@class='title-p']/text()").extract()
        item["link"] = response.xpath("//a[@class='play-btn']/img/@src").extract()
        yield item





